package net.wanho.client;

import net.wanho.entity.User;
import net.wanho.vo.AjaxResult;
import org.springframework.stereotype.Component;

/**
 * Author：汤小洋
 * Date：2024-04-08 10:57
 * Description：<描述>
 */
@Component
public class UserClientFallback implements UserClient{
    @Override
    public String test() {
        return "请求失败";
    }

    @Override
    public AjaxResult list(String username) {
        System.out.println("服务熔断开启。。。。。。。");
        return AjaxResult.error("获取用户列表失败");
    }

    @Override
    public AjaxResult add(User user) {
        return AjaxResult.error("添加用户失败");
    }
}
